home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dr. Health'nstein's Body Fun
/
bodyfun.iso
/
mac
/
MAC MOVIE FOLDER
/
MAZE.DIR
/
00499_Script_499
< prev
Wrap
Text File
|
1994-10-12
|
4KB
|
140 lines
on StartMovie
StdStartMovie
SetTextInfo "Portion", " ", "center", "helvetica", 18, "bold"
SetTextInfo "Answer", " ", "center", "helvetica", 12, "bold"
repeat with i = 22 to 26 -- hide foods on bottom
set the visible of sprite i to FALSE
end repeat
global MAZEPOINTS
set MAZEPOINTS = 0
end StartMovie
on StopMovie
global gMealArray
put empty into gMealArray
end
on BeforeHelp
end
on AfterHelp
end
on Choose direction
ShowTextAnswer
updateStage
global CorrectFoodChoice, MazeNumRight, MazeNumWrong
if (direction = "Left" and CorrectFoodChoice = 1) or (direction = "Right" and CorrectFoodChoice = 2) then
StartSound "RIGHT.AIF"
set MazeNumRight = MazeNumRight + 1
set the visible of sprite (15+MazeNumRight) to FALSE
set the fileName of cast ("Food " & MazeNumRight) to the fileName of cast ("Food " & direction)
CenterRegPoint(cast ("Food " & MazeNumRight))
set the visible of sprite (21+MazeNumRight) to TRUE
else
StartSound "WRONG.AIF"
set MazeNumWrong = MazeNumWrong + 1
end if
updateStage
set the visible of sprite 7 to FALSE
set the visible of sprite 8 to FALSE
set the visible of sprite 11 to FALSE
set the visible of sprite 10 to FALSE
global MazeMoves, gMovieMedia, MAZEPOINTS
set the fileName of cast "MOVES" to (gMovieMedia & "NUM_" & (MazeMoves - MazeNumRight - MazeNumWrong) & ".PIC")
--CenterRegPoint(cast "MOVES")
if (MazeNumRight = 5) then -- outa here
if MazeMoves = 5 then
set the fileName of cast "AWARD" to (gMovieMedia & "AWARD_1.PIC")
set MAZEPOINTS = 5
else if MazeMoves = 10 then
set the fileName of cast "AWARD" to (gMovieMedia & "AWARD_3.PIC")
set MAZEPOINTS = 1
else
set the fileName of cast "AWARD" to (gMovieMedia & "AWARD_2.PIC")
set MAZEPOINTS = 3
end if
--CenterRegPoint(cast "AWARD")
go to frame ("EXIT " & direction)
else if (MazeNumRight + MazeNumWrong) = MazeMoves then -- oops, didn't get 5 right
set the fileName of cast "AWARD" to (gMovieMedia & "PUNISH.PIC")
set MAZEPOINTS = -3
go to frame "Surrender"
else
go to frame direction
end if
end
on DisplayTwoFoods
global gMediaFolder, gSep
put gMediaFolder & "FOOD" & gSep & "FOODS" & gSep into foodFolder
global MazeCurMove, MazeStartAt
SetItemDelim(TAB)
global gMealArray
put line (MazeStartAt + MazeCurMove) of gMealArray into theChoices
set MazeCurMove = MazeCurMove + 1
put item 3 of theChoices into leftFood
put item 6 of theChoices into rightFood
global CorrectFoodChoice
put integer(item 2 of theChoices) into CorrectFoodChoice
global Portion11, Portion12, Portion21, Portion22, TextAnswer
put item 4 of theChoices into Portion11
put item 5 of theChoices into Portion12
if char 1 of Portion12 = "X" then set Portion12 = ""
put item 7 of theChoices into Portion21
put item 8 of theChoices into Portion22
if char 1 of Portion22 = "X" then set Portion22 = ""
put item 9 of theChoices into TextAnswer
set the fileName of cast "Food Left" to (foodFolder & leftFood)
BottomCenterRegPoint(cast "Food Left")
set the fileName of cast "Food Right" to (foodFolder & rightFood)
BottomCenterRegPoint(cast "Food Right")
updateStage
set the visible of sprite 7 to TRUE
set the visible of sprite 8 to TRUE -- show Left Food
set the visible of sprite 11 to TRUE -- show Right Food
set the visible of sprite 10 to TRUE
RestoreItemDelim
end DisplayTwoFoods
on ShowPortion
global Portion11, Portion12, Portion21, Portion22
put the mouseCast into theMouseCast
if theMouseCast > 0 then
if the name of cast theMouseCast = "Choose Left" then
if line 1 of field "Portion" <> Portion11 then
put Portion11 into line 1 of field "Portion"
put Portion12 into line 2 of field "Portion"
end if
else if the name of cast theMouseCast = "Choose Right" then
if line 1 of field "Portion" <> Portion21 then
put Portion21 into line 1 of field "Portion"
put Portion22 into line 2 of field "Portion"
end if
else if field "Portion" <> " " then
put " " into field "Portion"
end if
end if
end
on ShowTextAnswer
global TextAnswer
put TextAnswer into field "Answer"
end